package timbap.visualizer.api.plugin;

import timbap.visualizer.api.context.PluginContext;

/**
 * The <code>Plugin</code> interface is the common denominator of
 * all timbap plugins. Every plugin has to implement it.
 *
 * @author  Andreas Pabst
 */
public interface Plugin {

    /**
     * initializes the plugin so that it can 
     * be activated at any time.
     * 
     * @param pPluginContext	the context to use
     */
    public void init(PluginContext pPluginContext);

    /**
     * determines if the plugin has been initialized.
     * 
     * @return	true if initialization is finished
     */
    public boolean isInitialized();

    /**
     * determines if the plugin is currently active.
     * 
     * @return	true if plugin is currently active
     */
    public boolean isActive();

    /**
     * activates the plugin
     * 
     */
    public void activate();

    /**
     * passivates the plugin
     * 
     */
    public void passivate();
    
    /**
     * draws the plugin
     * 
     */
    public void draw();

}
